package com.hg.chapter8.jpa.entity;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.NamedQuery;

@Data
@Entity
@NamedQuery(name = "Person.myFindByName", query = "select p from Person p where  p.name=?1")
public class Person {

    private String name;

    private Integer age;

    private String sex;
}
